package Pattern.FactoryPattern.graph;

public class GraphTest {
    public static void main(String[] args) {
        ShapeFactory shapeFactory = new ShapeFactory();
        //获取circle对象并调取他的draw方法
        Shape circle = shapeFactory.getShape("CIRCLE");
        circle.draw();
        //获取square对象并调取他的draw方法
        Shape square = shapeFactory.getShape("SQUARE");
        square.draw();
        System.out.println(Shape.staticMethod());
        //获取rectangle的对象，并调取他的draw方法
        Shape rectangle = shapeFactory.getShape("rectangle");
        rectangle.draw();

    }
}
